package com.rumor.background.Mapper;


import com.rumor.background.pojo.*;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface AdminMapper {

    /*
     * 登录相关接口
     */
    int updateAdminCode(String username, String admin_code);

    Administrator queryAdminByUsername(String username);

    String queryAdminCodeByUsername(String username);

    String queryAdminCodeByAdminCode(String admin_code);

    /*
     * rumor投稿相关接口
     */
    List<RumorContributeBackground> queryAllRumorContribute();

    List<RumorContributeBackground> queryRumorContributeByDate(String date);

    List<RumorContributeBackground> queryAllMarkedRumorContribute(String mark);

    int markRumorContribute(String rumor_code, String mark);

    /*
     * 失物招领（找到）相关接口
     */
    List<FoundBackground> queryAllFound();

    List<FoundBackground> queryFoundByDate(String date);

    List<FoundBackground> queryAllMarkedFound(String mark);

    int markFound(String rumor_code, String mark);

    /*
     * 寻物启事（丢失）相关接口
     */
    List<LostBackground> queryAllLost();

    List<LostBackground> queryLostByDate(String date);

    List<LostBackground> queryAllMarkedLost(String mark);

    int markLost(String rumor_code, String mark);
}
